package com.ccys.app.controller;


import com.ccys.app.feignClient.NettyFeignService;
import com.ccys.app.service.MemberVietnamConsultService;
import com.ccys.common.constants.ContextConstants;
import com.ccys.common.vo.ResponseResult;
import com.ccys.common.vo.ResponseResultApp;
import com.ccys.db.dto.CommonDto;
import com.ccys.db.dto.member.*;
import feign.Request;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;


@RestController
@Api(tags = "越南咨询相关接口(Vietnam Post-consult flows  模块)")
@RequestMapping("Member")
public class MemberVietnamConsultController {

    @Autowired
    private MemberVietnamConsultService memberVietnamConsultService;


    //  Member/CalculationCost    Supervised ART 模块 XuLinYu 已写

    @ApiOperation("查询配送地址信息列表")
    @GetMapping(value = "/GetDeliveryAddressInfo")
    @ApiResponses({
        @ApiResponse(code = 411, message = ContextConstants.DESC_411),
        @ApiResponse(code = 200, message = ContextConstants.MODEL_DESC,response = ResponseResultApp.class),
    })
    public ResponseResultApp getDeliveryAddressInfo(CommonDto dto){
        return this.memberVietnamConsultService.getDeliveryAddressInfo(dto);
    }



    @ApiOperation("获取预订药房以进行自助取药")
    @GetMapping(value = "/GetBookingPharmacyForSelfPickUp")
    @ApiResponses({
        @ApiResponse(code = 411, message = ContextConstants.DESC_411),
        @ApiResponse(code = 200, message = ContextConstants.MODEL_DESC,response = ResponseResultApp.class),
    })
    public ResponseResultApp getBookingPharmacyForSelfPickUp(BookingPharmacyForSelfPickUpDto dto){
        return this.memberVietnamConsultService.getBookingPharmacyForSelfPickUp(dto);
    }
    @ApiOperation("获取支付信息")
    @GetMapping(value = "/GetPaymentInstruction")
    @ApiResponses({
        @ApiResponse(code = 411, message = ContextConstants.DESC_411),
        @ApiResponse(code = 200, message = ContextConstants.MODEL_DESC,response = ResponseResultApp.class),
    })
    public ResponseResultApp getPaymentInstruction(PaymentInstructionDto dto){
        return this.memberVietnamConsultService.getPaymentInstruction(dto);
    }

    @ApiOperation("更新咨询的支付类型")
    @GetMapping(value = "/UpdatePaymentScreenForDelivery")
    @ApiResponses({
        @ApiResponse(code = 411, message = ContextConstants.DESC_411),
        @ApiResponse(code = 200, message = ContextConstants.MODEL_DESC,response = ResponseResultApp.class),
    })
    public ResponseResultApp updatePaymentScreenForDelivery(UpdatePaymentScreenForDeliveryDto dto){
        return this.memberVietnamConsultService.updatePaymentScreenForDelivery(dto);
    }


    @ApiOperation("上传支付照片")
    @PostMapping(value = "/UploadPaymentPhoto")
    @ApiResponses({
        @ApiResponse(code = 411, message = ContextConstants.DESC_411),
        @ApiResponse(code = 200, message = ContextConstants.MODEL_DESC,response = ResponseResultApp.class),
    })
    public ResponseResultApp uploadPaymentPhoto(HttpServletRequest request,UploadPaymentPhotoDto dto){
        return this.memberVietnamConsultService.uploadPaymentPhoto(request,dto);
    }


}
